commonlibsse_ng\re\b/
BSISoundDescriptor.rs

1use crate::re::offsets_rtti::RTTI_BSISoundDescriptor;
2use crate::re::offsets_rtti::RTTI_BSISoundDescriptor__BSIPlaybackCharacteristics;
3use crate::re::offsets_vtable::VTABLE_BSISoundDescriptor;
4use crate::re::offsets_vtable::VTABLE_BSISoundDescriptor__BSIPlaybackCharacteristics;
5use crate::rel::id::VariantID;
6
7#[repr(C)]
8#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9pub struct BSISoundDescriptor {
10    pub vtbl: *const BSISoundDescriptorVtbl,
11}
12const _: () = assert!(core::mem::size_of::<BSISoundDescriptor>() == 0x8);
13
14impl BSISoundDescriptor {
15    pub const RTTI: VariantID = RTTI_BSISoundDescriptor;
16    pub const VTABLE: [VariantID; 1] = VTABLE_BSISoundDescriptor;
17}
18
19#[repr(C)]
20pub struct BSISoundDescriptorVtbl {
21    pub CxxDrop: extern "C" fn(this: *mut BSISoundDescriptor), // 0x00
22    pub Unk_01: extern "C" fn(this: *mut BSISoundDescriptor),  // 0x01
23    pub Unk_02: extern "C" fn(this: *mut BSISoundDescriptor),  // 0x02
24}
25const _: () = {
26    const ACTUAL_SIZE: usize = core::mem::size_of::<BSISoundDescriptorVtbl>();
27    const EXPECTED_SIZE: usize = (0x02 + 1) * core::mem::size_of::<usize>();
28    assert!(ACTUAL_SIZE == EXPECTED_SIZE);
29};
30
31#[repr(C)]
32#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
33pub struct BSIPlaybackCharacteristics {
34    pub vtbl: *const BSIPlaybackCharacteristicsVtbl,
35}
36const _: () = assert!(core::mem::size_of::<BSIPlaybackCharacteristics>() == 0x8);
37
38impl BSIPlaybackCharacteristics {
39    pub const RTTI: VariantID = RTTI_BSISoundDescriptor__BSIPlaybackCharacteristics;
40    pub const VTABLE: [VariantID; 1] = VTABLE_BSISoundDescriptor__BSIPlaybackCharacteristics;
41}
42
43#[repr(C)]
44pub struct BSIPlaybackCharacteristicsVtbl {
45    pub CxxDrop: extern "C" fn(this: *mut BSIPlaybackCharacteristics), // 0x0
46    pub GetFrequencyShift: extern "C" fn(this: *mut BSIPlaybackCharacteristics) -> u8, // 0x1
47    pub GetFrequencyVariance: extern "C" fn(this: *mut BSIPlaybackCharacteristics) -> u8, // 0x2
48    pub GetPriority: extern "C" fn(this: *mut BSIPlaybackCharacteristics) -> u8, // 0x3
49    pub GetStaticAttenuation: extern "C" fn(this: *mut BSIPlaybackCharacteristics) -> u16, // 0x4
50    pub GetDBVariance: extern "C" fn(this: *mut BSIPlaybackCharacteristics) -> u8, // 0x5
51}
52const _: () = {
53    const ACTUAL_SIZE: usize = core::mem::size_of::<BSIPlaybackCharacteristicsVtbl>();
54    const EXPECTED_SIZE: usize = (0x05 + 1) * core::mem::size_of::<usize>();
55    assert!(ACTUAL_SIZE == EXPECTED_SIZE);
56};